Skip to content

Conversation

Alex-Welsh
Copy link
Member

@Alex-Welsh Alex-Welsh commented Jul 7, 2025

This change subdivides the playbooks under the etc/kayobe/ansible/ directory into categories based on the content and purpose of the playbook.

The new categories are:

  • pulp
  • ceph
  • secret-store
  • fixes
  • deployment
  • maintenance
  • tools

The changes have been applied using various scripts, a few of which I have refined and added to this PR, namely:

  • tools/get-new-playbook-path.sh - returns the new category of a given playbook
  • tools/magic-symlink-fix.sh - Fixes all the symlinks it can find, using the previous script

@Alex-Welsh Alex-Welsh requested a review from a team as a code owner July 7, 2025 15:48
@product-auto-label product-auto-label bot added size: l documentation Improvements or additions to documentation kayobe-automation workflows Workflow files have been modified labels Jul 7, 2025
@Alex-Welsh Alex-Welsh force-pushed the ansible-directories branch from d6bc9ed to c396e39 Compare July 7, 2025 15:49
@Alex-Welsh Alex-Welsh marked this pull request as draft July 8, 2025 09:55
@Alex-Welsh Alex-Welsh force-pushed the ansible-directories branch 6 times, most recently from ffdb951 to 42fa998 Compare July 17, 2025 14:38
@technowhizz
Copy link
Contributor

Makes sense. Would be good to get them into the script before this gets merged though

@seunghun1ee
Copy link
Member

What do you think of dropping prefix of playbooks when the prefix and the category name is the same? Like secret-store, pulp, ceph.

@Alex-Welsh
Copy link
Member Author

What do you think of dropping prefix of playbooks when the prefix and the category name is the same? Like secret-store, pulp, ceph.

Discussed in-person
Decided to keep the long name since it's useful to know exactly what the playbook does & not duplicate names e.g. deploy.yml could exist in multiple directories and do different things.

100 playbooks in the same directory are hard for human brains to parse.
This change divides them up into sub-directories based on the content of
the playbook. Below is a list of all the new categories.

Pulp
====
pulp-container-publish.yml
pulp-container-sync.yml
pulp-host-image-download.yml
pulp-repo-promote-production.yml
pulp-amphora-image-download.yml
pulp-repo-publish.yml
pulp-artifact-promote.yml
pulp-repo-sync.yml
pulp-artifact-upload.yml
pulp-sync-publish-promote.yml
pulp-auth-proxy.yml

Ceph
====
cephadm-keys.yml
cephadm-pools.yml
cephadm-commands-post.yml
cephadm.yml
cephadm-commands-pre.yml
ceph-enter-maintenance.yml
cephadm-crush-rules.yml
ceph-exit-maintenance.yml
cephadm-deploy.yml
cephadm-ec-profiles.yml
cephadm-gather-keys.yml

Secret Store
====
secret-store-deploy-overcloud.yml
secret-store-deploy-seed.yml
secret-store-generate-backend-tls.yml
secret-store-generate-internal-tls.yml
secret-store-generate-test-external-tls.yml
secret-store-unseal-overcloud.yml
secret-store-unseal-seed.yml
secret-store-deploy-barbican.yml

Fixes
=====
ovn-fix-chassis-priorities.yml
run-container-hotfix.yml
fix-grub-rl9.yml
fix-hostname.yml
fix-houston.yml
fix-networking.yml
hotfix-containers.yml
rabbitmq-reset.yml
purge-command-not-found.yml

Deployment
==========
deploy-github-runner.yml
deploy-gitlab-runner.yml
deploy-openbao-kayobe-automation.yml
deploy-os-capacity-exporter.yml
deploy-radosgw-usage-exporter.yml
get-nvme-drives.yml
smartmon-tools.yml
wazuh-agent.yml
wazuh-manager.yml
wazuh-secrets.yml
write-github-workflows.yml
write-gitlab-pipelines.yml

Maintenance
===========
nova-compute-disable.yml
nova-compute-drain.yml
nova-compute-enable.yml
reboot.yml
rekey-hosts.yml
reset-bls-entries.yml
stop-openstack-services.yml
pci-passthrough.yml
ubuntu-upgrade.yml
cis.yml
octavia-amphora-image-build.yml
octavia-amphora-image-register.yml

Tools
=====
advise-run.yml
build-ofed-rocky.yml
check-kayobe-version.yml
check-kolla-ansible-version.yml
check-kolla-images-py.yml
check-tags.yml
configure-aio-resources.yml
configure-vxlan.yml
diagnostics.yml
docker-registry-login.yml
firewalld-watchdog.yml
get-cloud-facts.yml
growroot.yml
install-doca.yml
install-pre-commit-hooks.yml
openstack-host-image-upload.yml
prometheus-network-names.yml
prometheus.yml.j2
push-ofed.yml
rsyslog.yml
stackhpc-cloud-tests.yml

Playbook paths were edited with a set of commands like this:
grep -rFIl '/cephadm-keys.yml'  tools/ doc/source/ .ansible-lint-ignore etc/ .github/ .automation.conf/ terraform/ | xargs sed -i s:/cephadm-keys.yml:/ceph/cephadm-keys.yml:g

Commands were generated for every playbook using some multiline edits in
vscode

Added scripts for fixing Ansible playbook paths To
make the transition easier, this change includes a
magic script which will fix symlink paths.

Also added docs and fixed existing symlink paths
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation kayobe-automation size: l workflows Workflow files have been modified
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants